﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication3
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string username2 = "";
            string password2 = "";
            string username1 = Request.Form["username"];
            string password1 = Request.Form["password"];
            Response.Write($"欢迎你，{username1}，你的密码是：{password1}"+ "<br/><br/><br/>");

            if (PreviousPage!=null)
            {
                TextBox usernamebox = (TextBox)PreviousPage.FindControl("username");
                TextBox passwordbox = (TextBox)PreviousPage.FindControl("password");
                if (usernamebox!=null)
                {
                     username2 = usernamebox.Text;

                }
                if (passwordbox!=null)
                {
                     password2 = passwordbox.Text;
                }
            }
            Response.Write($"欢迎你，{username2}，你的密码是：{password2}" + "<br/><br/><br/>");

            string username3 = Request.Params["username"];
            string password3 = Request.Params["password"];
            Response.Write($"欢迎你，{username3}，你的密码是：{password3}" + "<br/><br/><br/>");


            string username4 = Request.QueryString["a"];
            string password4 = Request.QueryString["b"];
            string username5 = Request.Params["a"];
            string password5 = Request.Params["b"];
            Response.Write($"欢迎你，{username4}，你的密码是：{password4}" + "<br/><br/><br/>");
            Response.Write($"欢迎你，{username5}，你的密码是：{password5}" + "<br/><br/><br/>");
        }
    }
}